// JavaScript Document

	 function showMessage(msgContent, fwdLink, timeOut) {
	  if (fwdLink == "") {
	   msgContent = msgContent + "<a class='btn-submit msg-close' onClick='jQuery.colorbox.close();'>Ä�Ă³ng láº¡i</a>";
	   
	   jQuery.colorbox({
	    html:msgContent,
	    opacity:0.3,
	    innerWidth: 350,
	   });
	   
	   return;
	  }
	  else {
	   jQuery.colorbox({
	    html:msgContent,
	    opacity:0.3,
	    innerWidth: 350,
	   });
	   
	   window.setTimeout(function() {
	    jQuery.colorbox.close();
	    window.location.href = fwdLink;
	   }, timeOut);
	   
	   return;
	  }
	 }

jQuery(document).ready(function() {
	

	var mySwiper01 = new Swiper('.swiper-container01',{
        //Your options here:
        slidesPerView: 5,
        calculateHeight: true,
        slidesPerGroup: 1,
		autoplay: 3000
        //etc..
    });

    $('.arrow-left01').click(function(){
        mySwiper01.swipePrev();
    });

    $('.arrow-right01').click(function(){
        mySwiper01.swipeNext();
    });
	
	
	jQuery(window).scroll(function() {
		if (jQuery(this).scrollTop()!=0) {
			jQuery('#gototop').fadeIn();
		} else {
			jQuery('#gototop').fadeOut();
		}
	});
	jQuery('#gototop').click(function() {
		//$(window).scrollTop(300); 
		jQuery('body,html').animate({scrollTop:0});
	});
	
	
	 $(window).load(function() {
	        $('#slider').nivoSlider({
	        		pauseTime: 5000,
	        		controlNav: true
	        });
	 });
	 /* END NIVO SLIDER */
	 
	 
	 /*STUDY HOUR SET*/
	 $('#book-tchlist .teacher .menu li').click(function() {
		 
		 
	  $('#book-tchlist .teacher .menu li').removeClass('current'); 
	  $(this).addClass('current');
	  var section = $(this).attr('section');
	  $("#book-tchlist .teacher .set").removeClass('current');
	  $("#book-tchlist .teacher .set[section='" + section + "']").addClass('current');
	 });
	 /*END STUDY HOUR SET*/
	 
	 /*CLASS TAB*/
	 $('#page-class #main-content > .section .tabs li').click(function() {
	  var section = $(this).parents('.section');
	  section.find('.tabs li').removeClass('current');
	  $(this).addClass('current');
	  var tab = $(this).attr('tab');
	  section.find('.content > div').removeClass('current');
	  section.find(".content > div[tab='" + tab + "']").addClass('current');
	 });
	 /*END CLASS TAB*/
	 
	 
	 /*FEE TAB*/
	    $('#page-fee #main-content > .feeTabs .tabs a').click(function() {
	        var section = $(this).parents('.feeTabs');
	        section.find('.tabs a').removeClass('current');
	        $(this).addClass('current');
	        var tab = $(this).attr('tab');
	        section.find('.content > ul').removeClass('current');
	        section.find(".content > ul[tab='" + tab + "']").addClass('current');
	    });
	    /*END FEE TAB*/
	    
	    
	    /*FAQ CLICK TO SHOW*/
	    $('#page-faq .faq-list-item .faq-list-item-title').click(function() {
	        $(this).parents('.faq-list-item').find('.faq-list-item-content').slideToggle();
	    });
	    /*END FAQ CLICK TO SHOW*/
	 
	 
	 //showMessage("<p class='message'>Lorem ipsum dolor sit amet consectetur adipiscing elit ipsum amet dolor.</p>", "", 0);
	 //showMessage("<p class='message'>Lorem ipsum dolor sit amet consectetur adipiscing elit ipsum amet dolor.</p>", "http://google.com", 3000);
	 /*END LIGHTBOX MESSAGE*/
	
});